/**
 * created by sy 2018.12.29
 * */

export default {
  state: {
    isLogin: false
  },
  //获取登录状态
  getters: {
    isLogin: state => state.isLogin
  },
  //保存登录状态
  mutations: {
    userStatus(state,flag){
      state.isLogin = flag;
    }
  },
  //获取登录状态
  actions: {
    setUser({commit},flag){
      commit("userStatus",flag);
    }
  }
}
